package com.itany.springcloud.springcloudeurekazuul6001.config;

import com.netflix.loadbalancer.*;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

// @Configuration
@RibbonClient(name = "spring-eureka-ribbon",configuration = RibbonConfig.class)
public class RibbonConfig {

    @Bean
    public IRule ribbonRule(){
        return new RoundRobinRule();
        // return new WeightedResponseTimeRule();
        // return new RandomRule();
        // return new BestAvailableRule();
    }

}
